Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use new ARM crossbuild docker images #25987

Merged
merged 7 commits into from
Jun 3, 2021

Conversation

kuisathaverat
Copy link
Contributor

@kuisathaverat kuisathaverat commented May 28, 2021

What does this PR do?

It chooses the ARM Docker image to cross-compile based on the architecture.

Why is it important?

The ARM packages are currently broken.

Checklist

  • My code follows the style guidelines of this project
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • I have made corresponding change to the default configuration files
  • I have added tests that prove my fix is effective or that my feature works
  • I have added an entry in CHANGELOG.next.asciidoc or CHANGELOG-developer.next.asciidoc.

How to test this PR locally

git clone git@github.com:kuisathaverat/beats.git
cd beats/auditbeat
git checkout origin/fix_armv7 -b fix_armv7
mage package

Related issues

closes #25956

Use cases

Screenshots

Logs

@kuisathaverat kuisathaverat added bug Team:Automation Label for the Observability productivity team labels May 28, 2021
@kuisathaverat kuisathaverat requested review from andresrc, kvch and a team May 28, 2021 10:29
@kuisathaverat kuisathaverat self-assigned this May 28, 2021
@botelastic botelastic bot added needs_team Indicates that the issue/PR needs a Team:* label and removed needs_team Indicates that the issue/PR needs a Team:* label labels May 28, 2021
@kuisathaverat kuisathaverat added backport-v7.13.0 Automated backport with mergify backport-v7.14.0 Automated backport with mergify labels May 28, 2021
@elasticmachine
Copy link
Collaborator

elasticmachine commented May 28, 2021

💚 Build Succeeded

the below badges are clickable and redirect to their specific view in the CI or DOCS
Pipeline View Test View Changes Artifacts preview

Expand to view the summary

Build stats

  • Build Cause: kuisathaverat commented: /test

  • Start Time: 2021-06-02T14:21:55.690+0000

  • Duration: 34 min 39 sec

  • Commit: 5d3ae5e

Trends 🧪

Image of Build Times

❕ Flaky test report

No test was executed to be analysed.

Jenkinsfile Outdated Show resolved Hide resolved
@mergify
Copy link
Contributor

mergify bot commented May 28, 2021

This pull request is now in conflicts. Could you fix it? 🙏
To fixup this pull request, you can check out it locally. See documentation: https://help.github.com/articles/checking-out-pull-requests-locally/

git fetch upstream
git checkout -b fix_armv7 upstream/fix_armv7
git merge upstream/master
git push upstream fix_armv7

@andresrc
Copy link
Contributor

/test

@kuisathaverat
Copy link
Contributor Author

I guess I have to run make update

[2021-05-31T08:29:28.656Z] mage/crossbuild.go
[2021-05-31T08:29:55.275Z] >> check: Checking source code for common problems
[2021-05-31T08:30:21.897Z] Error: some files are not up-to-date. Run 'make update' then review and commit the changes. Modified: [dev-tools/mage/crossbuild.go]
[2021-05-31T08:30:21.897Z] ../libbeat/scripts/Makefile:152: recipe for target 'check' failed
[2021-05-31T08:30:21.897Z] make: *** [check] Error 1
[2021-05-31T08:30:21.897Z] make: Leaving directory '/var/lib/jenkins/workspace/PR-25987-7-fd802e94-5d5d-414e-949d-d4ee7a50ea36/src/github.com/elastic/beats/dev-tools'
script returned exit code 2

@kuisathaverat
Copy link
Contributor Author

kuisathaverat commented May 31, 2021

I have ran make update and there are no changes to push so I dunno why the lint of dev-tools fail

@kuisathaverat
Copy link
Contributor Author

after executing a make check the liting stage pass, but there are 3 test on libbeat that fail, they seem not related to the changes in this PR

Test stats 🧪

Test Results
Failed 3
Passed 18225
Skipped 1479
Total 19707

Test errors 3

Expand to view the tests failures

Build&Test / x-pack/libbeat-build / test_configs_cache – x-pack.libbeat.tests.system.test_management.TestManagement
    Expand to view the error details

     AssertionError: assert 1 == 0 
    

    Expand to view the stacktrace

     self = <test_management.TestManagement testMethod=test_configs_cache>
    
        @unittest.skipIf(not INTEGRATION_TESTS,
                         "integration tests are disabled, run with INTEGRATION_TESTS=1 to enable them.")
        def test_configs_cache(self):
            """
            Config cache is used if Kibana is not available
            """
            # Enroll the beat
            config_path = os.path.join(self.working_dir, "mockbeat.yml")
            self.render_config_template("mockbeat", config_path, keystore_path=self.keystore_path)
            exit_code = self.enroll(self.es_user, self.es_pass)
    >       assert exit_code == 0
    E       AssertionError: assert 1 == 0
    
    tests/system/test_management.py:172: AssertionError 
    

Build&Test / x-pack/libbeat-build / test_enroll – x-pack.libbeat.tests.system.test_management.TestManagement
    Expand to view the error details

     AssertionError: assert 1 == 0 
    

    Expand to view the stacktrace

     self = <test_management.TestManagement testMethod=test_enroll>
    
        @unittest.skipIf(not INTEGRATION_TESTS,
                         "integration tests are disabled, run with INTEGRATION_TESTS=1 to enable them.")
        def test_enroll(self):
            """
            Enroll the beat in Kibana Central Management
            """
        
            assert len(glob.glob(os.path.join(self.working_dir, "mockbeat.yml.*.bak"))) == 0
        
            # We don't care about this as it will be replaced by enrollment
            # process:
            config_path = os.path.join(self.working_dir, "mockbeat.yml")
            self.render_config_template("mockbeat", config_path, keystore_path=self.keystore_path)
        
            config_content = open(config_path, 'r').read()
        
            exit_code = self.enroll(self.es_user, self.es_pass)
        
    >       assert exit_code == 0
    E       AssertionError: assert 1 == 0
    
    tests/system/test_management.py:56: AssertionError 
    

Build&Test / x-pack/libbeat-build / test_fetch_configs – x-pack.libbeat.tests.system.test_management.TestManagement
    Expand to view the error details

     AssertionError: assert 1 == 0 
    

    Expand to view the stacktrace

     self = <test_management.TestManagement testMethod=test_fetch_configs>
    
        @unittest.skipIf(not INTEGRATION_TESTS,
                         "integration tests are disabled, run with INTEGRATION_TESTS=1 to enable them.")
        def test_fetch_configs(self):
            """
            Config is retrieved from Central Management and updates are applied
            """
            # Enroll the beat
            config_path = os.path.join(self.working_dir, "mockbeat.yml")
            self.render_config_template("mockbeat", config_path, keystore_path=self.keystore_path)
            exit_code = self.enroll(self.es_user, self.es_pass)
    >       assert exit_code == 0
    E       AssertionError: assert 1 == 0
    
    tests/system/test_management.py:109: AssertionError 
    

@andresrc
Copy link
Contributor

andresrc commented Jun 1, 2021

/test

2 similar comments
@kuisathaverat
Copy link
Contributor Author

/test

@kuisathaverat
Copy link
Contributor Author

/test

@kuisathaverat
Copy link
Contributor Author

Test errors 1

Expand to view the tests failures

Extended / metricbeat-windows-10-windows-10 / test_processors – metricbeat.tests.system.test_lightmodules.Test
    Expand to view the error details

     beat.beat.TimeoutError: Timeout waiting for 'cond' to be true. Waited 10 seconds. 
    

    Expand to view the stacktrace

     self = <test_lightmodules.Test testMethod=test_processors>
    
        def test_processors(self):
            shutil.copytree(
                os.path.join(self.beat_path, "mb/testing/testdata/lightmodules"),
                os.path.join(self.working_dir, "module"),
            )
        
            with http_test_server() as server:
                self.render_config_template(modules=[{
                    "name": "test",
                    "metricsets": ["json"],
                    "namespace": "test",
                    # Hard-coding 'localhost' because hostname in server.server_name doesn't always work.
                    "hosts": [f"localhost:{server.server_port}"],
                }])
        
                proc = self.start_beat()
        
    >           self.wait_until(lambda: self.output_lines() > 0)
    
    tests\system\test_lightmodules.py:32: 
    _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
    
    self = <test_lightmodules.Test testMethod=test_processors>
    cond = <function Test.test_processors.<locals>.<lambda> at 0x00000265B03BBC10>
    max_timeout = 10, poll_interval = 0.1, name = 'cond'
    
        def wait_until(self, cond, max_timeout=10, poll_interval=0.1, name="cond"):
            """
            Waits until the cond function returns true,
            or until the max_timeout is reached. Calls the cond
            function every poll_interval seconds.
        
            If the max_timeout is reached before cond() returns
            true, an exception is raised.
            """
            start = datetime.now()
            while not cond():
                if datetime.now() - start > timedelta(seconds=max_timeout):
    >               raise TimeoutError("Timeout waiting for '{}' to be true. ".format(name) +
                                       "Waited {} seconds.".format(max_timeout))
    E               beat.beat.TimeoutError: Timeout waiting for 'cond' to be true. Waited 10 seconds.
    
    ..\libbeat\tests\system\beat\beat.py:362: TimeoutError 
    

@kuisathaverat
Copy link
Contributor Author

/test

@kuisathaverat
Copy link
Contributor Author

environmental issue login to the docker registry

@kuisathaverat
Copy link
Contributor Author

/test

@kuisathaverat
Copy link
Contributor Author

kuisathaverat commented Jun 2, 2021

GrEEEn 😄 I will merge it Tomorrow

@kuisathaverat kuisathaverat merged commit 7426f67 into elastic:master Jun 3, 2021
mergify bot pushed a commit that referenced this pull request Jun 3, 2021
* fix: use new ARM crossbuild docker images

* fix: enable ARMv7 package

* fix: use base-arm-debian9 only on ARM64 hosts

* chore: re-disable amrv7

* fix: linting issue

(cherry picked from commit 7426f67)

# Conflicts:
#	.ci/packer_cache.sh
mergify bot pushed a commit that referenced this pull request Jun 3, 2021
* fix: use new ARM crossbuild docker images

* fix: enable ARMv7 package

* fix: use base-arm-debian9 only on ARM64 hosts

* chore: re-disable amrv7

* fix: linting issue

(cherry picked from commit 7426f67)

# Conflicts:
#	.ci/packer_cache.sh
#	dev-tools/mage/crossbuild.go
kuisathaverat added a commit that referenced this pull request Jun 24, 2021
* fix: use new ARM crossbuild docker images

* fix: enable ARMv7 package

* fix: use base-arm-debian9 only on ARM64 hosts

* chore: re-disable amrv7

* fix: linting issue

(cherry picked from commit 7426f67)

# Conflicts:
#	.ci/packer_cache.sh

Co-authored-by: Ivan Fernandez Calvo <kuisathaverat@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backport-v7.13.0 Automated backport with mergify backport-v7.14.0 Automated backport with mergify bug Team:Automation Label for the Observability productivity team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

auditbeat packaging: exec: "arm-linux-gnueabihf-gcc": executable file not found
8 participants